package org.transfer;

import java.net.URLDecoder;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.transfer.service.DeleteLogFileService;
import org.transfer.service.MonitorProducer;
import org.transfer.utils.ConfigUtil;

@EnableAutoConfiguration
@ComponentScan
@MapperScan("org.transfer.dao")

@SpringBootApplication
public class AnalysisDataMicroApplication {
	public static void main(String[] args) {
		try {
			ConfigUtil.init(URLDecoder.decode(new ConfigUtil().getPath(), "UTF-8") + "config.properties");
		} catch (Exception e) {
			System.out.println("配置文件初始化失败！");
		}
		SpringApplication.run(AnalysisDataMicroApplication.class, args);
		MonitorProducer.init();
		DeleteLogFileService.init();
	}

}
